package com.panfeng.xcloud.boss.provider.member.dao.mapper;

import com.panfeng.xcloud.boss.provider.member.web.vo.response.GetApiInfoRespVO;
import com.panfeng.xcloud.dao.member.entity.UserAccount;
import com.panfeng.xcloud.dao.member.mapper.UserAccountMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserAccountMapperExt extends UserAccountMapper {

    String queryLatestAccountId();

    List<UserAccount> queryByUserId(String userId);

    /**
     * 查询该用户所有okex账户
     * @param userId
     * @param exchangeType
     * @return
     */
    List<UserAccount> queryExchangeAccountByUserId(@Param("userId")String userId,@Param("exchangeType")Integer exchangeType,@Param("accountBizType")Integer accountBizType);

    List<UserAccount> queryUnbindExchangeAccountByUserId(@Param("userId")String userId,@Param("exchangeType")Integer exchangeType,@Param("accountBizType")Integer accountBizType);

    int updateAccountNumById(UserAccount record);

    UserAccount queryByAccountId(String accountId);

    List<String> queryByAcctType(UserAccount record);

    Integer queryAccountNumber(String userId);

    Integer queryAccountTotal(String userId);

    int updateAccountInfo(UserAccount record);

    Integer queryTotalByUserAccount(@Param("userId")String userId, @Param("accountId")String accountId);

    Integer queryNewAccountTotal(String userId);

    int deleteRealCoinTradeUserAccount(@Param("userId") String userId);

    UserAccount selectRealCoinTradeUserAccount(String userId);

    UserAccount selectFictitousFollowContractUserAccount(String userId);

    /**
     * 获取api信息接口
     * @param accountId
     * @return
     */
    GetApiInfoRespVO getApiInfo(String accountId);

    /**
     * 获取账户正在持仓的币种
     * @param accountId
     * @return
     */
    List<String> getAccountPositionCoin(String accountId);


}